package com.spring.boot.controller;

import com.spring.boot.pojo.JsonResult;
import com.spring.boot.service.impl.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * IOC&DI
 */
@RestController
public class IocController {
    //    EmpService empService=new EmpService();
    @Autowired
    EmpService empService ;

    @RequestMapping("/iocAndDI")
    public JsonResult iocAndDI() {
        empService.makeAccessEmpService();
        System.out.println("IocController.iocAndDI");
        System.out.println(IocController.class);
        return JsonResult.success("iocAndDI Ok~");
    }
}
